package implicits

import cats.data.Validated
import command.CommandExec
import tool.Pojo.MyMessage

/**
 * Created by Administrator on 2019/9/12
 */
trait MyCommandExecTool {

  implicit class MyCommandExec(commandExec: CommandExec[Any, Boolean]) {

    def toMyMessage = {
      val message = commandExec.errorInfo
      MyMessage(commandExec.isSuccess, message)
    }

  }

}
